package com.huqing.icu.rentuser.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huqing.icu.rentuser.enums.UserRegisterSourceEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.sql.Timestamp;

/**
 * 用户信息实体类
 *
 * @author huqing
 * @date 2024-11-06 22:03
 */
@TableName(value = "user")
@Data
public class User {

    @Schema(name = "userId", description = "用户ID")
    @TableId(value = "user_id")
    private Long userId;

    @Schema(name = "wxOpenId", description = "微信openId")
    @TableField(value = "wx_open_id")
    private String wxOpenId;

    @Schema(name = "nickname", description = "昵称")
    @TableField(value = "nickname")
    private String nickname;

    @Schema(name = "name", description = "真实姓名")
    @TableField(value = "name")
    private String name;

    @Schema(name = "avatar", description = "头像")
    @TableField(value = "avatar")
    private String avatar;

    @Schema(name = "description", description = "自我描述")
    @TableField(value = "description")
    private String description;

    @Schema(name = "mobile", description = "手机号")
    @TableField(value = "mobile")
    private String mobile;

    @Schema(name = "identifyNumber", description = "身份证")
    @TableField(value = "identify_number")
    private String identifyNumber;

    /**
     * @see UserRegisterSourceEnum
     */
    @Schema(name = "registerSource", description = "来源 1-PC官网 2-微信小程序")
    @TableField(value = "register_source")
    private Integer registerSource;

    /*@Schema(name = "inviteCode", description = "邀请码")
    @TableField(value = "invite_code")
    private String inviteCode;

    @Schema(name = "inviteUserId", description = "邀请人ID")
    @TableField(value = "invite_user_id")
    private Long inviteUserId;*/

    @Schema(name = "lastLoginTime", description = "上一次登录时间")
    @TableField(value = "last_login_time")
    private Timestamp lastLoginTime;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time")
    private Timestamp createTime;

    @Schema(name = "modifyTime", description = "修改时间")
    @TableField(value = "modify_time")
    private Timestamp modifyTime;

}
